package cn.hj.spring.springboot;


import lombok.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.stereotype.Component;

@Getter
@Setter
@ToString
@AllArgsConstructor
@Component
@NoArgsConstructor
@ConfigurationProperties(prefix = "person")
@PropertySource(value = "person.properties")
public class Person {
    @Value("${person.id}")
    private int id;
    @Value("${person.name}")
    private String name;
}
